package com.yanqu.road.entity.activity.entername;

import java.util.ArrayList;
import java.util.List;

public class EnterNameCount implements Comparable<EnterNameCount>{

    int groupId;

    long count;

    List<Integer> zoneList = new ArrayList<>();

    public EnterNameCount(int groupId, long count) {
        this.groupId = groupId;
        this.count = count;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    @Override
    public int compareTo(EnterNameCount o) {
        return Long.compare(o.getCount(), this.count);
    }

    public List<Integer> getZoneList() {
        return zoneList;
    }

    public void setZoneList(List<Integer> zoneList) {
        this.zoneList = zoneList;
    }

    public void addZoneId(int zoneId) {
        if(!zoneList.contains(zoneId)){
            zoneList.add(zoneId);
        }
    }
}
